dxp-ux

(0 reviews)

Post PaymentMethod (TMF-670) towards SFDC

This API will allows you to create payment method in Salesforce

URL
https://[localhost]:[port]/dxp-ux/v1/{businessId}/paymentMethod

URL PARAMS

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (PR) identifying the business unit.Y

Headers

namevaluedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringAn identifier for the current call chain that can be used to tie together log entries on multiple layers (e.g. client, server, mainframe). This identifier must be designed to be unique across all applications.
Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request
Y
Request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/dxp-ux/dxp-ux/v1/PR/paymentMethod' \
--header 'X-Correlation-ID: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92cRR' \
--header 'client_id: c6481aae6594401a81a7b987d5d7db7c' \
--header 'client_secret: 1767331975414e10b5CCb226005DD813' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "cGF5bWVudG1ldGhvZF9jY181a25obmtzZg",
    "account": [
        {
            "id": "23641038-23642394",
            "@type": "BillingAccount",
            "relatedParty": [
                {
                   "id": "16654555678",
                    "@type": "msisdn"
                }
            ]
        }
    ],
    "relatedParty": [
        {
            "name": "BrainTreeToken",
            "@type": "paymentGatewayType"
        },
        {
            "@type": "channel",
            "name": "Digital"
        },
        {
            "@type": "restrictOrder",
            "name": "true"
        }
    ]
}'
Definitions
namevalue (length)descriptionrequired
tokenString (50)payment method token from payment gatewayY
accountArraydetails of accountN
account.idString (30)billing account number (BAN-CAN). (either msisdn or billingAccountNumber is mandatory)Y*
account.@typeStringtype of the account, expecting static value is 'BillingAccount'N
account.relatedPartyArraydetails of account related partyN
account.relatedParty.idString (20)Mobile Device number, (either msisdn or billingAccountNumber is mandatory)Y*
account.relatedParty.@typeStringtype of the account related party, expecting static value is 'msisdn'N
relatedPartyStringdetails of related party, for more details refer below relatedParty values tableN
relatedParty.nameStringname of the related partyN
relatedParty.@typeStringtype of the related partyN
relatedParty Vlaues
relatedParty typevaluedescriptionrequired
paymentGatewayTypeString (30)payment method gateway type, Possible values are BrainTreeToken or EvertecY
restrictOrderBooleanRestrict the order submission if it is call center flow, true / false (default false)N
channelString (20)Source System information for tracking purpose, like IVR, DigitalY
[ 200 ]

OK - updateBillingAccount request processed successfully, response body contains an entity corresponding to the requested resource.

Response
{
    "description": "payment method create request received"
}
Definitions
namevaluedescriptionrequired
descriptionStringdescription of the responseN

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400 ,
      "message" : "The request is invalid or not properly formed.",
      "description" : "Badrequest"
    }
  ]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401 ,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }
  ]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{

      "code" : 404,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method post not allowed for : /{businessId}/payment"
        }]
}
[ 429 ]

Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.

{
  "errors" : [{

      "code" : 429,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "The request failed due to an internal error.",
      "description": ""
    }
  ]
}
[ 501]
{
   "errors":[
      {
         "code":501,
         "message":"Not implemented",
         "description":"Operation POST /paymentMethod for Business Id: XXXX not implemented"
      }
   ]
}
[ 503 ]

Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.


Reviews